import { BaseProvider } from "./BaseProvider";

export class ViewMakerProvider extends BaseProvider {
    private _viewMaker: Function = null;

    constructor(maker: Function) {
        super();

        this._viewMaker = maker;
    }

    public getEntity(...args: any[]) {
        if (this._viewMaker) {
            let view = this._viewMaker(...args);
            return view;
        } else {
            return null;
        }
    }

}